<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Page 2</title>
  <style>
    @import url(browser_cmd_csscoverage_sheetD.css);

    /* This should match below */
    .page2-test1 {
      color: #021;
    }
    /* This should not match below */
    .page2-test2 {
      color: #022;
    }
    /* This doesn't match until the event fires */
    .page2-test3 {
      color: #023;
    }
  </style>

  <link rel="stylesheet" type="text/css" href="browser_cmd_csscoverage_sheetA.css">
  <link rel="stylesheet" type="text/css" href="browser_cmd_csscoverage_sheetB.css">
  <script type="application/javascript;version=1.8">
  /* How quickly do we rush through this? */
  let delay = 500;
  window.addEventListener("load", () => {
    dump('TEST-INFO | load from browser_cmd_csscoverage_page2.html\n');
    setTimeout(() => {
      dump('TEST-INFO | timeout from browser_cmd_csscoverage_page2.html\n');
      /* This adds <div class=page2-test3></div> */
      let parent = document.querySelector("#page2-test3-holder");
      let child = document.createElement("div");
      child.classList.add("page2-test3");
      parent.appendChild(child);
    }, delay);
  });
  </script>
</head>
<body>

<h2>Page 2</h2>

<div class=page2-test1>.page2-test1</div>

<div id=page2-test3-holder></div>

<div class=sheetA-test1>.sheetA-test1</div>
<div class=sheetA-test4>.sheetA-test4</div>
<div class=sheetB-test1>.sheetB-test1</div>
<div class=sheetB-test4>.sheetB-test4</div>
<div class=sheetC-test1>.sheetC-test1</div>
<div class=sheetC-test4>.sheetC-test4</div>
<div class=sheetD-test1>.sheetD-test1</div>
<div class=sheetD-test4>.sheetD-test4</div>

</body>
</html>
